﻿using System;

namespace CalculatorLib
{
    public class MathLib
    {
        public float Percent(float part, float total)
        {
            if (total == 0)
                throw new DivideByZeroException();
            if(part>total)
                return 1;
            return (part/total)*100;
        }
    }
}
